<template>
  <i @click="click" v-if="!!iconName && iconName.includes('icon-')" :class="[iconName, className]" class="iconfont"></i>
  <a-icon @click="click" v-else-if="!!iconName" :type="iconName"></a-icon>
</template>

<script>
  export default {
    name: 'DistIcon',
    props: {
      iconName: {
        type: String,
        default: ''
      },
      className: {
        type: String,
        default: ''
      },
      click: {
        type: Function,
        default: new Function()
      }
    }
  }
</script>
